package come.whvc

object Test9 {
  def main(args: Array[String]): Unit = {
    val rawEvents = List(
      "user1:view|click",
      "user2:view",
      "user3:purchase|view"
    )
    val userActions = rawEvents.flatMap { line =>
      val Array(user, actions) = line.split(":", 2)
      actions.split("\\|").map(action => user -> action)
    }
    val rawScores = List("u1:1,2", "u2:3", "u3:")

  }
}
